/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package libraries;

import java.io.File;

/**
 *
 * @author aeguzkiza
 */
public class PathLibrary {
    private String pathProject;
    private static String dcm4che2Version = "dcm4che-2.0.27";

    public PathLibrary() {
                    
            pathProject = System.getProperty("user.dir");
                //pathProject = FileSystemView.getHomeDirectory();
                //pathProject = new java.io.File(".").getCanonicalPath();

            //pathProject = pathProject.replaceAll("\\\\+", "/"); // Replaces '\' with '/'
            //System.out.println("pathProject" + pathProject);
    }

    public String getrootPath(){
        return this.pathProject;
    }

    public String getdcm4chePath(){
        //String dcm4chePath = combinedPath("/lib/"+this.dcm4che2Version+"/bin/");
        String dcm4chePath = combinedPath("/lib/dcm4che2/bin/");
        return dcm4chePath;
    }
    public String getdcm4cheXMLPath(){
        String dcm4chePath = combinedPath("/lib/dcm4che2/xml/");
        return dcm4chePath;
    }
    public String getimgs2sendPath(){ 
        String imgs2sendPath = combinedPath("/src/Software Images/imgs2send/");
        return imgs2sendPath;
    }
    public String getimgs2savePath(){ 
        String imgs2sendPath = combinedPath("/src/Software Images/imgsInDatabase/");
        return imgs2sendPath;
    }
    public String getGUIPath(){ // Not used yet.
        String GUIPath = combinedPath("/src/GUI/");
        return GUIPath;
    }
    
    public String combinedPath(String endPath){
        File file1 = new File(this.pathProject);
        File file2 = new File(file1, endPath);
        String combination = file2.getPath();
        //System.out.println("Combination: "+ this.pathProject +" and "+ endPath +" => "+ combination);
        return combination;
    }

}
